<?php
// $Id: cache.class.php 123 2011-12-29 10:08:50Z tomqin@gmail.com $

session_start();

define('ARESCMS_PATH', dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR);

require '../system/base.php';

Base::loadLibrary('controller/admin');

if(array_get_string($_POST, 'dosubmit')){
	$username = array_get_string($_POST, 'username');
	$password = array_get_string($_POST, 'password');
	$res = AdminUser::login($username, $password);

	if($res){
		header("Location: /admin/index.php");
	}else{
		View::setVar('error', '用户名或者密码错误！');
	}
}

View::addView('admin/login');
View::display();


?>